/*
 * map_lua.h
 */

#ifndef MAP_LUA_H_
#define MAP_LUA_H_

#include "map_file.h"
#include <lua/luaR.h>

/*
 * Initializes the map Lua interface.
 */
int map_lua_initialize();

/*
 * Takes the top entity on the stack of the given Lua state and attempts to
 * convert it into a map_tile structure.
 */
struct map_tile map_lua_getTile( lua_State *L );

/*
 * Lua hook to the function:
 * int create_map( const char *name, unsigned int height, unsigned int width );
 */
int map_lua_create( lua_State *L );

/*
 * Lua hook to the function:
 * int write_tile( struct map_tile *t );
 */
int map_lua_writeTile( lua_State *L );

/*
 * Lua hook to the function:
 * int map_exists( const char *name );
 */
int map_lua_exists( lua_State *L );

#endif
